<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title><%= h(yield(:title) || "Devise") %></title>
    <%= stylesheet_link_tag 'application' %>
    <%= yield(:head) %>
  </head>
  <body>
    <div id="container">
      <%- flash.each do |name, msg| -%>
        <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
      <%- end -%>

      <p><%= link_to 'Home', root_path %></p>

      <% if user_signed_in? -%>
        <div id="user_login_box" style="float:right">
          <%= current_user.email %> |
          <%= link_to 'My info', edit_user_registration_path %> |
          <%= link_to 'Sign out', destroy_user_session_path %>
        </div>
      <% end -%>
      
      <div style="clear:both"></div>

      <%- if show_title? -%>
        <h1><%=h yield(:title) %></h1>
      <%- end -%>

      <%= yield %>
    </div>
  </body>
</html>
